package com.example.ksnacosconsumer.Client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import pojo.Customer;

@FeignClient(value = "ks-nacos-provider")
public interface CustomerClient {

    @RequestMapping(value = "/InsertCustomer")
    public boolean InsertCustomer(@RequestBody Customer customer);

    @RequestMapping(value = "/DelCustomer")
    public boolean DelCustomer(@RequestParam("id") int id);

    @RequestMapping(value = "/UpdateCustomer")
    public boolean UpdateCustomer(@RequestBody Customer customer);

    @RequestMapping(value = "/SelCustomer")
    public String SelCustomer(@RequestParam("customerNumber") String customerNumber,
                              @RequestParam("customerName") String customerName,
                              @RequestParam("pageno") Integer pageno);
}
